From d5b7d8191dad08a014015a8bf02cac8f36e301bd Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 14 Oct 2003 13:20:00 +0000 Subject: [PATCH] Correctly terminate created string. From Mark Bradley. --- gpsbabel/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpsbabel/util.c b/gpsbabel/util.c index 5219a6606..de96b5959 100644 --- a/gpsbabel/util.c +++ b/gpsbabel/util.c @@ -171,7 +171,7 @@ xstrndupt(const char *str, size_t sz) newstr = xmalloc(newlen + 1); memcpy(newstr, str, newlen); - newstr[newlen+1] = '\0'; + newstr[newlen] = '\0'; rtrim(newstr); return newstr; -- 2.30.2